`ifndef AHBL_MST_BURST_APB_SLV_ERR_SV
`define AHBL_MST_BURST_APB_SLV_ERR_SV


class ahbl_mst_burst_apb_slv_err extends ahbl2apb_base_test;

	ahbl_mst_simple_burst_seq	ahbl_seq;
	apb_slv_pslverr_seq 			apb_seq;

	`uvm_component_utils(ahbl_mst_burst_apb_slv_err)

	function new(string name = "ahbl_mst_burst_apb_slv_err", uvm_component parent = null);
		super.new(name, parent);
	endfunction : new

	function void build_phase(uvm_phase phase);
		super.build_phase(phase);

		ahbl_seq 	= ahbl_mst_simple_burst_seq::type_id::create("ahbl_seq");
		apb_seq		= apb_slv_pslverr_seq::type_id::create("apb_seq");
	endfunction : build_phase

	task main_phase(uvm_phase phase);
		int num_apb_seq;

		super.main_phase(phase);
		phase.raise_objection(this);
		#1us;
		fork
			begin
				ahbl_seq.start(env.ahbl_mst_agt.sequencer);
			end
			begin
				num_apb_seq = 0;
				while(1) begin
					apb_seq.start(env.apb_slv_agt.sequencer);
					num_apb_seq ++;
					if(num_apb_seq >= ahbl_seq.req.get_burst_beats()) begin
						break;
					end
				end
			end
		join
		phase.drop_objection(this);
	endtask : main_phase

endclass : ahbl_mst_burst_apb_slv_err


`endif // AHBL_MST_BURST_APB_SLV_ERR_SV
